package com.yoomiito.app.ui.college.detail

import android.view.ViewGroup
import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yoomiito.app.R
import com.yoomiito.app.model.colleage.SubjectTableInfo
import com.yoomiito.app.ui.anyview.college.SubjectTableView
import com.yoomiito.app.utils.ImageLoader

class SubjectTableAdapter(s: List<SubjectTableInfo>?) : BaseQuickAdapter<SubjectTableInfo, BaseViewHolder>(R.layout.item_subject_table, s) {

    override fun convert(helper: BaseViewHolder?, item: SubjectTableInfo?) {
        helper?.getView<SubjectTableView>(R.id.subjectTableView).let {
            it?.select(if (item?.isClick!!) item?.isSelected!! else false)
            it?.setText(item?.title!!)
            it?.isEnabled = item?.isClick!!
        }

    }

}